From d8a689313bf91c02ae40b107bffbb35f186dcae5 Mon Sep 17 00:00:00 2001 From: "kaf24@localhost.localdomain" Date: Fri, 26 Jan 2007 16:39:38 +0000 Subject: [PATCH] Remove the test functions from HVM highmem 32-bit BIOS. Signed-off-by: Stefan Berger --- tools/firmware/rombios/32bit/32bitbios.c | 24 --------- tools/firmware/rombios/32bitgateway.c | 67 ------------------------ tools/firmware/rombios/32bitprotos.h | 38 ++++++-------- tools/firmware/rombios/rombios.c | 1 - 4 files changed, 15 insertions(+), 115 deletions(-) diff --git a/tools/firmware/rombios/32bit/32bitbios.c b/tools/firmware/rombios/32bit/32bitbios.c index a7cc9cf460..d1d8fd2561 100644 --- a/tools/firmware/rombios/32bit/32bitbios.c +++ b/tools/firmware/rombios/32bit/32bitbios.c @@ -23,26 +23,6 @@ #include "jumptable.h" #include "32bitprotos.h" -/* same prototypes as in the 16bit BIOS */ -Bit32u multiply(Bit32u a, Bit32u b) -{ - return a*b; -} - -Bit32u add(Bit32u a, Bit32u b) -{ - return a+b; -} - -static Bit32u stat_a = 0x1; -Bit32u set_static(Bit32u a) -{ - Bit32u _a = stat_a; - stat_a = a; - return _a; -} - - /* the jumptable that will be copied into the rombios in the 0xf000 segment for every function that is to be called from the lower BIOS, make an entry @@ -51,10 +31,6 @@ Bit32u set_static(Bit32u a) #define TABLE_ENTRY(idx, func) [idx] = (uint32_t)func uint32_t jumptable[IDX_LAST+1] __attribute__((section (JUMPTABLE_SECTION_NAME))) = { - TABLE_ENTRY(IDX_MULTIPLY , multiply), - TABLE_ENTRY(IDX_ADD , add), - TABLE_ENTRY(IDX_SET_STATIC , set_static), - TABLE_ENTRY(IDX_TCPA_ACPI_INIT, tcpa_acpi_init), TABLE_ENTRY(IDX_TCPA_EXTEND_ACPI_LOG, tcpa_extend_acpi_log), diff --git a/tools/firmware/rombios/32bitgateway.c b/tools/firmware/rombios/32bitgateway.c index c224bffe5a..98f61be6e4 100644 --- a/tools/firmware/rombios/32bitgateway.c +++ b/tools/firmware/rombios/32bitgateway.c @@ -418,71 +418,4 @@ ASM_END #include "32bitprotos.h" #include "32bitgateway.h" -/******************************************************************** - Collection of stub functions for functions executed in 32bit space - *******************************************************************/ - -Bit32u multiply(a, b) /* for testing */ - Bit32u a; - Bit32u b; -{ - ASM_START - DoUpcall IDX_MULTIPLY - ASM_END -} - -Bit32u add(a, b) /* for testing */ - Bit32u a; - Bit32u b; -{ - ASM_START - DoUpcall IDX_ADD - ASM_END -} - -Bit32u set_static(a, b) /* for testing */ - Bit32u a; - Bit32u b; -{ - ASM_START - DoUpcall IDX_SET_STATIC - ASM_END -} - -/* a function to test the gateway */ -void -test_gateway() -{ - Bit32u res; - Bit16u err = 0; - - printf("32bit gateway "); - res = multiply(11111L,222L); - if (err = 0 && res != 11111L * 222L) { - printf("not working correctly: multiply\n"); - err = 1; - } - - res = add(111111L, 222222L); - if (err = 0 && res != 111111L + 222222L) { - printf("not working correctly: add\n"); - err = 1; - } - - res = set_static(0x12345678L); - if (err = 0 && res != 0x1L) { - printf("not working correctly: set_static (1)\n"); - err = 1; - } - res = set_static(0x11111111L); - if (err = 0 && res != 0x12345678L) { - printf("not working correctly: set_static (2)\n"); - err = 1; - } - - if (err == 0) { - printf("working correctly\n"); - } -} - #include "tcgbios.c" diff --git a/tools/firmware/rombios/32bitprotos.h b/tools/firmware/rombios/32bitprotos.h index e9abbd6e32..ea5d9fafcd 100644 --- a/tools/firmware/rombios/32bitprotos.h +++ b/tools/firmware/rombios/32bitprotos.h @@ -5,25 +5,21 @@ /* shared include file for bcc and gcc */ /* bcc does not like 'enum' */ -#define IDX_MULTIPLY 0 -#define IDX_ADD 1 -#define IDX_SET_STATIC 2 - -#define IDX_TCGINTERRUPTHANDLER 3 -#define IDX_TCPA_ACPI_INIT 4 -#define IDX_TCPA_EXTEND_ACPI_LOG 5 -#define IDX_TCPA_CALLING_INT19H 6 -#define IDX_TCPA_RETURNED_INT19H 7 -#define IDX_TCPA_ADD_EVENT_SEPARATORS 8 -#define IDX_TCPA_WAKE_EVENT 9 -#define IDX_TCPA_ADD_BOOTDEVICE 10 -#define IDX_TCPA_START_OPTION_ROM_SCAN 11 -#define IDX_TCPA_OPTION_ROM 12 -#define IDX_TCPA_IPL 13 -#define IDX_TCPA_INITIALIZE_TPM 14 -#define IDX_TCPA_MEASURE_POST 15 - -#define IDX_LAST 16 /* keep last! */ +#define IDX_TCGINTERRUPTHANDLER 0 +#define IDX_TCPA_ACPI_INIT 1 +#define IDX_TCPA_EXTEND_ACPI_LOG 2 +#define IDX_TCPA_CALLING_INT19H 3 +#define IDX_TCPA_RETURNED_INT19H 4 +#define IDX_TCPA_ADD_EVENT_SEPARATORS 5 +#define IDX_TCPA_WAKE_EVENT 6 +#define IDX_TCPA_ADD_BOOTDEVICE 7 +#define IDX_TCPA_START_OPTION_ROM_SCAN 8 +#define IDX_TCPA_OPTION_ROM 9 +#define IDX_TCPA_IPL 10 +#define IDX_TCPA_INITIALIZE_TPM 11 +#define IDX_TCPA_MEASURE_POST 12 + +#define IDX_LAST 13 /* keep last! */ #ifdef GCC_PROTOS @@ -33,10 +29,6 @@ #define PARMS(x...) #endif -Bit32u multiply( PARMS(Bit32u a, Bit32u b) ); -Bit32u add( PARMS(Bit32u a, Bit32u b) ); -Bit32u set_static( PARMS(Bit32u) ); - Bit32u TCGInterruptHandler( PARMS(pushad_regs_t *regs, Bit32u esds, Bit32u flags_ptr)); void tcpa_acpi_init( PARMS(void) ); diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c index ab6c06d567..a874b23d15 100644 --- a/tools/firmware/rombios/rombios.c +++ b/tools/firmware/rombios/rombios.c @@ -1860,7 +1860,6 @@ print_bios_banner() printf("TCG-enabled BIOS.\n"); #endif printf("\n"); - test_gateway(); } -- 2.30.2